package cloneExample;

import java.io.Serializable;

/**
 * 地址类
 */
public class Address implements Cloneable, Serializable {
	private Integer id;
	private String city;

	/**
	 * 重写 clone 方法
	 *
	 * @throws CloneNotSupportedException
	 */
	@Override
	protected Address clone() throws CloneNotSupportedException {
		return (Address) super.clone();
	}

	public Address() {
	}

	public Address(Integer id, String city) {
		this.id = id;
		this.city = city;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
}
